<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/common/tags.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="UTF-8">
    <meta name="Keywords" content="">
    <meta name="description" content="">
    <%@include file="/common/style.jsp" %>
    <link rel="stylesheet" type="text/css" href="${static_url}/ui/app/assets/css/uc.css">
    <style>
        .stock-area input {
            border: 1px solid #cdcdcd;
            width: 33px;
            text-align: center;
            margin: 0 5px;
            padding: 1px!important;
            height: 15px!important;
            line-height: 15px!important;
        }
        .stock-area input {
            border-color: #999;
        }
        .stock-area  .textbox {
            height: 18px!important;
            line-height: 18px!important;
            padding: 9px 0!important;
            margin: 0;
            width: 50px;
        }
    </style>

    <%@include file="/common/javascript.jsp" %>
</head>
<body class="wide">
<!-- 头部 -->
<%@include file="/common/myHeader.jsp" %>
<!-- /头部 -->

<!-- 主体 -->
<div style="border-top: solid 1px #dcdcdc;" class="mb10"></div>
<div class="g">
    <!--面包屑 -->
    <%--<div class="breadcrumb-area"><a href="/" title="首页">首页</a>&nbsp;&nbsp;\&nbsp;&nbsp;<em
            id="personCenter"><span>我的商城</span></em><em id="pathPoint"></em><span id="pathTitle"></span></div>--%>
</div>
<div class="h20"></div>
<div class="g">
    <div class="fr u-4-5"><!-- 20141212-栏目-start -->
        <div class="section-header">
            <div class="fl">
                <h2><span>我的订单</span></h2>
            </div>
            <%--<div class="fr">
                <div class="ec-tab" id="ec-tab">
                  <ul>
                        <li class="current"><a href="javascript:;" onclick="ec.member.orderList.seltime(this,0);"><span>最近三月内订单</span></a>
                        </li>
                        <li class=""><a href="javascript:;"
                                        onclick="ec.member.orderList.seltime(this,1);"><span>三个月前订单</span></a></li>
                    </ul>
                    <div class="ec-tab-arrow" style="width: 124px; left: 0px; overflow: hidden;"></div>
                </div>
            </div>--%>
        </div>
        <!-- 20141212-栏目-end -->
        <!-- 20141222-我的订单-订单类别-start -->
        <%-- <div class="myOrder-cate" id="myOrder-cate">

           <ul>
               <li class="current"><a href="javascript:;"><span>全部<em></em></span></a>
               </li>
              <li style="display: list-item;"><a href="javascript:;" onclick="ec.member.orderList.check(this,'unpaid');"><span>待支付<em id="count-seltime-2" class="hide" data-num="0" style="display: none;">0</em></span></a></li>
                   <li><a href="javascript:;" onclick="ec.member.orderList.check(this,'nocomment');"><span>待评价<em id="nocommentNum" data-num="0" data-his="4" style="display: none;">0</em></span></a></li>
                   <li style="display: list-item;"><a href="javascript:;" onclick="ec.member.orderList.check(this,'send');"><span>待收货<em id="count-seltime-3" class="hide" data-num="0" style="display: none;">0</em></span></a></li>
                   <li><a href="javascript:;" onclick="ec.member.orderList.check(this,'finished');"><span>已完成</span></a></li>
                   <li><a href="javascript:;" onclick="ec.member.orderList.check(this,'canceled');"><span>已取消</span></a></li>
             </ul>
        </div>--%>
        <!-- 20141222-我的订单-订单类别-end -->

        <!-- 20141222-我的订单-列表-start -->
        <div class="myOrder-record" id="myOrders-list-content">
            <!-- 20141222-我的订单-列表-订单合并-start -->
            <%--  <div class="myOrder-control">
                <label class="inputbox" for="checkAllBox">
                     <input class="checkbox" type="checkbox" id="checkAllBox" name="checkAllBox"><span>全选</span>
                 </label>
                <a href="javascript:;" class="button-operate-merge-pay" onclick="ec.member.orderList.mergePay();"><span>合并支付</span></a>
            </div>--%>
            <!-- 20141222-我的订单-列表-订单合并-end -->
            <div class="list-group-title">
                <table border="0" cellpadding="0" cellspacing="0">
                    <thead>
                    <tr>
                        <th class="col-pro">商品</th>
                        <th class="col-price">买家</th>
                        <th class="col-price">房主</th>
                        <th class="col-pay">价格</th>
                        <th class="col-pay">实付款</th>
                        <th class="col-operate">订单状态及操作</th>
                    </tr>
                    </thead>
                </table>
            </div>
            <div class="list-group" id="list-group">
                <c:forEach items="${pager.records}" var="item" varStatus="status">
                <div class="list-group-item">
                    <c:if test="${status.first}">
                    <div class="o-info">
                        <div class="col-info">
                            <span class="o-date">${myfn:formatTimestamp(item.create_time)}</span>
                            <span class="o-no">订单号：<a href="##" title="">${item.order_no}</a></span>

                        </div>
                        <%--<div class="col-state">已完成&nbsp;|&nbsp;已付款</div>--%>
                    </div>
                    </c:if>
                    <div class="o-pro">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tbody>

                            <tr>
                                <td class="col-pro-img">
                                    <p class="p-img">
                                        <a title="" href="${ctx}/detail.htm?id=${item.spid}" target="_blank">
                                            <img src="${fileServerUrl}/${item.image_url}" >
                                        </a>
                                    </p>
                                </td>
                                <td class="col-pro-info">
                                    <p class="p-name">
                                        <a title="" target="_blank" href="${ctx}/detail.htm?id=${item.spid}" target="_blank">
                                            ${item.name}
                                        </a>
                                    </p>
                                </td>
                                <td class="col-price">
                                    <p>${item.buyer.aliasName}</p>
                                    <p>${item.buyer.tel}</p>
                                </td>
                                <td class="col-price">
                                    <p>${item.house.owner}</p>
                                    <p>${item.house.ownerPhone}</p>
                                </td>
                                <td  class="col-pay">
                                    <p><span>${item.price}万</span></p>
                                </td>
                                <td  class="col-pay">
                                    <p>
                                    <div class="stock-area">
                                        <input id="quantity-82" type="text" class="textbox changeRealPrice"
                                               value="${item.pay}" data-subOrderNo="${item.sub_order_no}" > 万
                                    </div>
                                    </p>
                                </td>
                                <td rowspan="1" class="col-operate">
                                    <c:if test="${item.state==0}">

                                       <p>
                                           <a class="button-operate-revie" href="${ctx}/my/seller/confirmOrder.htm?orderNo=${item.base64OrderNo}" orderinfo="" title="审核通过">
                                            审核通过
                                        </a>
                                       </p>

                                        <p class="mt5">
                                        <a class="button-operate-revie" href="##" orderinfo="" title="拒绝">
                                            拒绝
                                        </a>
                                        </p>
                                        </c:if>
                                    <%--<p class="p-button">
                                        <a class="button-operate-revie" href="##" orderinfo="" title="我要评论">
                                            <span>我要评论</span>
                                        </a>
                                    </p>
                                    <p class="p-link">
                                        <a href="javascript:;" data-href="##"onclick="">
                                            退换货
                                        </a>
                                    </p>
                                    <p class="p-link"><a href="##">订单详情</a></p></td>--%>
                            </tr>

                            </tbody>
                        </table>
                    </div>
                </div>
                </c:forEach>
            </div>

            <div class="list-group-page">
                <div class="multi-page">
                    <c:if test="${pager.totalRecord>0}">
                        <jsp:include page="/common/ui/pagerUI.jsp">
                            <jsp:param name="pageNo" value="${pager.pageNo}"/>
                            <jsp:param name="pageCount" value="${pager.pageCount}"/>
                            <jsp:param name="total" value="${pager.totalRecord}"/>
                            <jsp:param name="callback" value="callback"/>
                        </jsp:include>
                    </c:if>

                    <c:if test="${pager.totalRecord<=0}">
                        暂无数据！
                    </c:if>
                    <script>
                        function callback(pageNo){
                            alert(pageNo);
                        }
                    </script>
                </div>
            </div>
        </div>
        <!-- 我的订单-列表-end -->
    </div>
    <div class="fl u-1-5">
        <!--左边菜单 -->
        <%@include file="left.jsp" %>
    </div>
    <div class="hr-45"></div>
</div>
<script>
    $(function(){
        $(".changeRealPrice").keypress(function(event){
                if(event.keyCode==13){
                    var subOrderNo = $(this).attr("data-subOrderNo");
                    var realPrice = $(this).val();
                    var reg = /^\d+(\.\d{1,2})?$/;
                    if(!reg.test(realPrice)){
                        alert("请输入数字，或带小数点的数字！");
                        return false;
                    }
                    $.post("${ctx}/my/seller/changeOrderPrice.htm",
                            {subOrderNo:subOrderNo,realPrice:realPrice},
                            function(data){
                                if(data.status){
                                    alert("修改价格成功！");
                                }else{
                                    alert("修改价格失败！");
                                }
                            },"json");
                }
            });
    });
</script>
<!-- /主体 -->


<!-- 底部 -->
<%@include file="/common/footer.jsp" %>
<!-- /底部 -->

</body>
</html>
